package com.nowcoder.code.lcof;

public class JZ66 {

    public static void main(String[] args) {

    }


    int[] is;

    public int[] multiply(int[] A) {
        is = new int[A.length];

        multiply(A, 0, 1);
        return is;
    }

    public int multiply(int[] A, int i, int last) {
        if (i >= A.length) {
            return 1;
        }
        int next = multiply(A, i + 1, last * A[i]);

        is[i] = last * next;
        return A[i] * next;
    }


}
